home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 242
/
242.d81
/
veil of tiers
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
15KB
|
547 lines
10 poke56,130:clr
20 dv=peek(186):ifdv<8thendv=8
30 print"[159]":poke53280,0:poke53281,0
40 sys57812"vt font",dv,0:poke780,0:poke781,0:poke782,8:sys65493
50 sys57812"cm-scr-wp-unp",dv,0:poke780,0:poke781,0:poke782,195:sys65493
52 sys57812"s.vttitle.shp",dv,0:poke780,0:poke781,0:poke782,90:sys65493
54 poke251,90:poke252,224:poke253,204:sys51456:sys51459
56 zz=zz+1:geta$:ifa$=""andzz<700then56
60 sys57812"mrj49152",dv,0:poke780,0:poke781,0:poke782,192:sys65493
70 sys57812"s.vt.shp",dv,0:poke780,0:poke781,0:poke782,138:sys65493
78 sys51459
80 print"[147]":poke53281,0:poke53272,(peek(53272)and240)or2
90 poke251,138:poke252,224:poke253,204:sys51456:sys51459
100 poke53280,11:i=rnd(-ti)
110 sd=54272:fori=0to24:pokesd+i,0:next:pokesd+5,18:pokesd+6,18:pokesd+24,15
120 pokesd+12,3:pokesd+13,40
130 gosub5100
140 un=51456:hg=51459:wp=50944:sc=50176:cm=49920
150 syssc,224,204,8
160 goto1030
170 :
180 :rem screen save
190 :
200 syscm,1024,130*256,1000:syscm,55296,134*256,1000:return
210 syscm,130*256,1024,1000:syscm,134*256,55296,1000:return
220 :
230 :rem text box
240 :
250 poke646,c:poke214,y:print
260 printtab(x)"[176]"left$(tp$,xx)"[174]"
270 fori=1toyy:printtab(x)"[171]"left$(sp$,xx)"[146][179]":next
280 printtab(x)"[173]"left$(bt$,xx)"[189]"
290 return
300 :
310 :rem menu box
320 :
330 syssc+6,29,11,"[144][146][176][178][178][178][178][178][178][178][174]"
340 fori=1to4:syssc+6,29,11+i,"[171] [146][179]":next
350 syssc+6,29,16,"[173][177][177][177][177][177][177][177][189]"
360 return
370 :
380 :rem shuffle/deal/runes
390 :
400 fori=0to5:rr(i)=i:next
410 fori=0to5:r=int(rnd(1)*6)
420 t=rr(r):rr(r)=rr(i):rr(i)=t:next
430 fori=0to6:forj=0to9
440 pc(i,j)=int(rnd(1)*4):next:next
450 fori=0to3:ni(6,i)=0:next
460 fori=0to9:ni(6,pc(6,i))=ni(6,pc(6,i))+1:next
470 i=0
480 ifi=ni(6,0)then500
490 pc(6,i)=0:i=i+1:goto480
500 ifi=ni(6,0)+ni(6,1)then520
510 pc(6,i)=1:i=i+1:goto500
520 ifi=ni(6,0)+ni(6,1)+ni(6,2)then540
530 pc(6,i)=2:i=i+1:goto520
540 ifi=10then560
550 pc(6,i)=3:i=i+1:goto540
560 return
570 :
580 :rem rune parameters
590 :
600 fori=0to5:forj=0to2
610 r(i,j)=int(rnd(1)*(rh(i,j)-rl(i,j)+1)+rl(i,j))
620 ifj=1thenifr(i,1)=r(i,0)then600
630 next:next
640 return
650 :
660 :rem evaluate pl's score
670 :
680 fori=0to3:ni(pl,i)=0:v(pl,i)=10:next:ps(pl)=0
690 fori=0to9:ni(pl,pc(pl,i))=ni(pl,pc(pl,i))+1:next
700 fori=0to5:ifpl=6thenifrg(i)=0then720
710 oni+1gosub4100,4150,4200,4260,4320,4380
720 next
730 fori=0to3:ps(pl)=ps(pl)+v(pl,i)*ni(pl,i):next
740 return
750 :
760 :rem pick four
770 :
780 fori=0to9:fl(i)=0:next:co=0
790 r=int(rnd(1)*10)
800 iffl(r)then790
810 tr(co)=r:fl(r)=1:co=co+1:ifco<4then790
820 return
830 poke214,15:print:printtab(3)"[149][195]hoose up to four of "pl$(g)"'s"
840 printtab(3)"ikons and an equal number of "
850 printtab(3)"your own for trade. "
860 printtab(3)" [210] - [211]ee the runes you know "
870 printtab(3)" [196] - [196]one. [199]o back to the game ":return
880 :
890 :rem clear ikons
900 :
910 poke214,15:print:fori=0to4:printtab(3)"[149]"left$(sp$,34):next:return
920 :
930 :
940 :rem prompt and wait
950 :
960 poke214,23:print:printtab(14)"[159][208]ress a key"
970 poke198,0
980 geta$:ifa$=""then980
990 gosub5100:return
1000 :
1010 :rem initialize
1020 :
1030 dimpc(7,10),ni(7,10),r(6,3),rr(7),rh(6,3),rl(6,3),m$(7),b$(4),ic$(4),pl$(7)
1040 dimv(7,4),ps(7),gx(6),gy(6),sx(16),sy(16),bb$(4)
1050 zx(0)=91:zx(1)=93:zx(2)=60:zx(3)=62
1060 tp$="[178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178]"
1070 sp$=" "
1080 bt$="[177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177]"
1090 fori=1to4:readm$(i):next
1100 data" [212][210][193][196][197] "," [210][213][206][197][211] "," [211][212][207][210][217] "," [195][197][193][211][197] "
1110 fori=1to4:readm1$(i):next
1120 data" [211][195][207][210][197] "," [210][213][206][197][211] "," [201][203][207][206][211] "," [194][197][199][201][206] "
1130 b$(0)="[158]#$[157][157]%&":b$(1)="[158][220][221][157][157]^[223]":b$(2)="[158][160][161][157][157][162][163]":b$(3)="[158][164][165][157][157][166][167]"
1140 bb$(0)="#$[157][157]%&":bb$(1)="[220][221][157][157]^[223]":bb$(2)="[160][161][157][157][162][163]":bb$(3)="[164][165][157][157][166][167]"
1150 fori=0to6:readpl$(i):next
1160 data"[202][193][196][193][215][201][206]","[195][200][210][217][211][197][201][211]","[210][197][196] [207][210][195]","[193][206][193][206][193]","[203][201][195][203][193][200][193]","[208][207][196][193][210][199][197]","[208][204][193][217][197][210]"
1170 fori=0to5:forj=0to2:readrh(i,j),rl(i,j):next:next
1180 data5,3,3,0,3,1,4,2,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1
1190 ic$(0)="crescents":ic$(1)="horns":ic$(2)="bells":ic$(3)="tierworlds"
1200 cs$=" "
1210 fori=0to2:gx(i)=3+9*i:gy(i)=8:next:fori=3to5:gx(i)=3+9*(i-3):gy(i)=17:next
1220 fori=704to751:pokei,255:next:fori=752to767:pokei,0:next
1230 fori=2040to2047:pokei,11:next:v=53248:pokev+16,0:pokev+29,0:pokev+23,0
1240 pokev+27,255:pokev+21,0:pokev+39,12:fori=40to46:pokev+i,8:next
1250 fori=0to9:sx(i)=60+i*24:sy(i)=114:next:sx(9)=22
1260 fori=11to14:sx(i)=68+(i-10)*40:sy(i)=154:next
1270 sx(10)=60:sy(10)=154:sx(15)=22:sy(15)=154
1280 sys49152,chr$(13)+"[145][157]",20,20,10,10
1290 gosub4880:rem get name
1300 open2,dv,2,"vt."+pl$(6)
1310 input#2,gp
1320 fori=0to6:input#2,pt(i):next
1330 close2
1340 open15,dv,15:input#15,a,a$,a,a:close15
1350 fori=19to22:syssc+6,2,i,"[149][158][146]"+left$(sp$,36):next
1360 syssc+6,7,22,"[202][213][211][212] [193] [211][197][195] - [195][207][213][206][212][201][206][199] [201][203][207][206][211]"
1370 fori=0to5:hl=204*256+(gy(i)-1)*40+gx(i)-2:forj=0to7:pokehl+j,12:next:next
1380 poke53280,11:gosub400:gosub600:gosub330:m=1:gd=0:gp=gp+1
1390 fori=0to5:rg(i)=0:next
1400 forpl=0to6:gosub680:next
1410 syssc+6,2,22,"[149][158]"+left$(sp$,36)
1420 :
1430 :rem screen setup
1440 :
1450 syssc+6,2,20,"[144][149]":fori=0to9:syssc+6,3+i*3,19,b$(pc(6,i)):next
1460 syssc+6,4,22,"[158][149]"+left$(sp$,30)
1470 syssc+6,33,20,"[211][195][207][210][197]"
1480 fori=0to9:syssc+6,2+3*i,22,"[129] [157][157][157]"+str$(v(6,pc(6,i))):next
1490 syssc+6,33,22," [157][157][157][157]"+str$(ps(6))
1500 ifgd=6then4440
1510 fori=0to5:syssc+6,gx(i),gy(i),"[152][144] [157][157][157][157]"+str$(ps(i)):next
1520 ifrg(rr(g))thenhl=204*256+(gy(g)-1)*40+gx(g)-2:fori=0to7:pokehl+i,11:next
1530 :
1540 :rem menu loop
1550 :
1560 fori=1to4:syssc+6,30,11+i,"[153]"+m$(i):next
1570 syssc+6,30,11+m,""+m$(m)
1580 poke198,0
1590 geta$:ifa$=""then1590
1600 gosub5100
1610 ifa$="t"thenm=1:goto1710
1620 ifa$="r"thenm=2:goto1710
1630 ifa$="s"thenm=3:goto1710
1640 ifa$="c"thenm=4:goto1710
1650 syssc+6,30,11+m,"[153]"+m$(m)
1670 ifa$=chr$(13)then1710
1680 ifa$="[145]"thenm=m-1:ifm<1thenm=4
1690 ifa$=""thenm=m+1:ifm>4thenm=1
1700 goto1570
1710 onmgosub1770,2970,3550,3950
1720 ifm=1then1450
1730 goto1560
1740 :
1750 :rem trade
1760 :
1770 gosub330:gd=gd+1
1780 syssc+6,30,12,"[153] [212][210][193][196][197] "
1790 syssc+6,30,13," [215][201][212][200] "
1800 syssc+6,30,14," [215][200][201][195][200] "
1810 syssc+6,30,15," [204][207][210][196]? "
1820 g=0
1830 syssc+6,gx(g)-2,gy(g),"[152]"+cs$
1840 syssc+6,gx(g),gy(g),"[144]"+str$(ps(g))
1850 geta$:ifa$=""then1850
1860 gosub5100
1870 syssc+6,gx(g)-2,gy(g),"[152][152]"+cs$
1880 syssc+6,gx(g),gy(g),"[144][152]"+str$(ps(g))
1890 ifa$="j"theng=0:a$=chr$(13)
1900 ifa$="c"theng=1:a$=chr$(13)
1910 ifa$="r"theng=2:a$=chr$(13)
1920 ifa$="a"theng=3:a$=chr$(13)
1930 ifa$="k"theng=4:a$=chr$(13)
1940 ifa$="p"theng=5:a$=chr$(13)
1950 ifa$=chr$(13)andrg(rr(g))=0then2020
1960 ifa$=chr$(13)andrg(rr(g))=1thengosub5180:goto1830
1970 ifa$="[145]"theng=g-3:ifg<0theng=g+6
1980 ifa$=""theng=g+3:ifg>5theng=g-6
1990 ifa$=""theng=g+1:ifg=3org=6theng=g-3
2000 ifa$="[157]"theng=g-1:ifg=-1org=